<h1>{{editType}}系统用户</h1>
<form name="userForm" novalidate>
    
    <div class="form-group" show-errors>
        <label class="control-label">用户名<span class="need">*</span></label>
        <input type="text" class="form-control" ng-disabled="user.objectId"  name="name" ng-model="user.username" required placeholder="名称"/>
        <p class="help-block" ng-if="userForm.name.$error.required">必填</p>
    </div>

    <div class="form-group">
        <label class="control-label">密码<span ng-if="!user.objectId" class="need">*</span></label>
        <input type="password" class="form-control" name="password" ng-model="user.password" placeholder="密码"/>
    </div>
    

    <div class="form-group">
        <label class="control-label">手机</label>
        <input type="text" class="form-control" name="mobilePhoneNumber" ng-model="user.mobilePhoneNumber" placeholder="手机号码"/>

    </div>

    <div class="form-group">
        <label class="control-label">邮箱</label>
        <input type="text" class="form-control" name="email" ng-model="user.email" placeholder="email"/>
    </div>
    

    <div class="form-group">
        <label class="control-label">角色</label>
        <select  class="form-control" ng-model="user.role">
            <option value="" ng-selected="!user.role">不选</option>
            <option ng-repeat="g in roles" value="{{g.objectId}}" ng-selected="user.role == g.objectId">{{g.name}}</option>
        </select>
    </div>



    <div class="mt20 fix">
        <button class="btn btn-primary" ng-click="save()">保存</button>
        <button class="btn btn-link" ng-click="reset()">重置</button>
    </div>

</form>